<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <fieldset id="onself_data"> http://code.ciaoca.com/jquery/cxSelect/demo/oneself 各选项数据接口独立
            <div class="form">
                <dl class="row">
                    <dt>省份a</dt>
                    <dd><select id="province" class="province select" name="province"
                                th:data-url="@{/select/province}"></select></dd>
                </dl>
                <dl class="row">
                    <dt>城市</dt>
                    <dd><select class="city select"
                                name="city" th:data-url="@{/select/city}"
                                data-json-space="data"></select></dd>
                </dl>
                <dl class="row">
                    <dt>地区</dt>
                    <dd><select class="area select" name="area" data-url="_test/area.php"
                                data-json-space="data.list"></select></dd>
                </dl>
            </div>
        </fieldset>

    </body>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script th:src="@{/jquery.cxselect.min.js}"></script>
    <script>
        $('#onself_data').cxSelect({
            selects: ['province', 'city', 'area'],
            jsonName: 'name',
            jsonValue: 'value'
        });
        $(function () {
            console.log("init")
            $('#province').prop('data-value', '3')
        })
        $('#province').prop('data-value', 2)
        console.log("finished")
    </script>
</html>
